/**  

 * Copyright © 2010-2015 Tydic. All rights reserved.

 *

 * @Title: GsonBuilderUtil.java

 * @Prject: fesco-common

 * @Package: common.utils

 * @Description: TODO

 * @author: leijun@tydic.com

 * @date: 2015年12月3日 下午4:23:00

 * @version: V1.0  

 */
package common.utils;

import java.text.DateFormat;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**

 * @ClassName: GsonBuilderUtil

 * @Description: TODO

 * @author: leijun@tydic.com

 * @date: 2015年12月3日 下午4:23:00


 */
public class GsonBuilderUtil {

	public static Gson create() {
        GsonBuilder gb = new GsonBuilder();
        gb.registerTypeAdapter(java.util.Date.class, new DateSerializer()).setDateFormat(DateFormat.LONG);
        gb.registerTypeAdapter(java.util.Date.class, new DateDeserializer()).setDateFormat(DateFormat.LONG);
        Gson gson = gb.create();
        return gson;
    }
}
